package stardust.core.network.protocol.http;


/**
 * MIME 类型
 * <p/>
 * @author 陈昶
 */
public enum MIMEType
{

  all("*/*"),
  evy("application/envoy"),
  fif("application/fractals"),
  spl("application/futuresplash"),
  hta("application/hta"),
  acx("application/internet-property-stream"),
  hqx("application/mac-binhex40"),
  doc("application/msword"),
  dot("application/msword"),
  any("application/octet-stream"),
  bin("application/octet-stream"),
  dms("application/octet-stream"),
  exe("application/octet-stream"),
  lha("application/octet-stream"),
  lzh("application/octet-stream"),
  oda("application/oda"),
  axs("application/olescript"),
  pdf("application/pdf"),
  prf("application/pics-rules"),
  p10("application/pkcs10"),
  crl("application/pkix-crl"),
  ai("application/postscript"),
  eps("application/postscript"),
  ps("application/postscript"),
  rtf("application/rtf"),
  setpay("application/set-payment-initiation"),
  setreg("application/set-registration-initiation"),
  xla("application/vnd.ms-Excel"),
  xlc("application/vnd.ms-Excel"),
  xlm("application/vnd.ms-Excel"),
  xls("application/vnd.ms-Excel"),
  xlt("application/vnd.ms-Excel"),
  xlw("application/vnd.ms-Excel"),
  sst("application/vnd.ms-pkicertstore"),
  cat("application/vnd.ms-pkiseccat"),
  stl("application/vnd.ms-pkistl"),
  powt("application/vnd.ms-PowerPoint"),
  pps("application/vnd.ms-PowerPoint"),
  ppt("application/vnd.ms-PowerPoint"),
  mpp("application/vnd.ms-project"),
  wcm("application/vnd.ms-works"),
  wdb("application/vnd.ms-works"),
  wks("application/vnd.ms-works"),
  bcpio("application/x-bcpio"),
  cdf("application/x-cdf"),
  z("application/x-compress"),
  tgz("application/x-compressed"),
  cpio("application/x-cpio"),
  csh("application/x-csh"),
  dcr("application/x-director"),
  dir("application/x-director"),
  dxr("application/x-director"),
  dvi("application/x-dvi"),
  gtar("application/x-gtar"),
  gz("application/x-gzip"),
  hdf("application/x-hdf"),
  ins("application/x-internet-signup"),
  isp("application/x-internet-signup"),
  iii("application/x-iphone"),
  js("application/x-javascript"),
  latex("application/x-latex"),
  mdb("application/x-msaccess"),
  crd("application/x-mscardfile"),
  clp("application/x-msclip"),
  dll("application/x-msdownload"),
  m13("application/x-msmediaview"),
  m14("application/x-msmediaview"),
  mvb("application/x-msmediaview"),
  wmf("application/x-msmetafile"),
  mny("application/x-msmoney"),
  pub("application/x-mspublisher"),
  scd("application/x-msschedule"),
  trm("application/x-msterminal"),
  wri("application/x-mswrite"),
  ncdf("application/x-netcdf"),
  nc("application/x-netcdf"),
  pma("application/x-perfmon"),
  pmc("application/x-perfmon"),
  pml("application/x-perfmon"),
  pmr("application/x-perfmon"),
  pmw("application/x-perfmon"),
  p12("application/x-pkcs12"),
  pfx("application/x-pkcs12"),
  p7b("application/x-pkcs7-certificates"),
  spc("application/x-pkcs7-certificates"),
  p7r("application/x-pkcs7-certreqresp"),
  p7c("application/x-pkcs7-mime"),
  p7m("application/x-pkcs7-mime"),
  p7s("application/x-pkcs7-signature"),
  sh("application/x-sh"),
  shar("application/x-shar"),
  sit("application/x-stuffit"),
  sv4cpio("application/x-sv4cpio"),
  sv4crc("application/x-sv4crc"),
  tar("application/x-tar"),
  tcl("application/x-tcl"),
  tex("application/x-tex"),
  texi("application/x-texinfo"),
  texinfo("application/x-texinfo"),
  roff("application/x-troff"),
  t("application/x-troff"),
  tr("application/x-troff"),
  man("application/x-troff-man"),
  me("application/x-troff-me"),
  ms("application/x-troff-ms"),
  ustar("application/x-ustar"),
  src("application/x-wais-source"),
  cer("application/x-x509-ca-cert"),
  crt("application/x-x509-ca-cert"),
  der("application/x-x509-ca-cert"),
  pko("application/ynd.ms-pkipko"),
  zip("application/zip"),
  au("audio/basic"),
  snd("audio/basic"),
  mid("audio/mid"),
  rmi("audio/mid"),
  mp3("audio/mpeg"),
  aif("audio/x-aiff"),
  aifc("audio/x-aiff"),
  aiff("audio/x-aiff"),
  m3u("audio/x-mpegurl"),
  ra("audio/x-pn-realaudio"),
  ram("audio/x-pn-realaudio"),
  wav("audio/x-wav"),
  bmp("image/bmp"),
  cod("image/cis-cod"),
  gif("image/gif"),
  ief("image/ief"),
  jpe("image/jpeg"),
  jpeg("image/jpeg"),
  jpg("image/jpeg"),
  jfif("image/pipeg"),
  tif("image/tiff"),
  tiff("image/tiff"),
  ras("image/x-cmu-raster"),
  cmx("image/x-cmx"),
  ico("image/x-icon"),
  pnm("image/x-portable-anymap"),
  pbm("image/x-portable-bitmap"),
  pgm("image/x-portable-graymap"),
  ppm("image/x-portable-pixmap"),
  rgb("image/x-rgb"),
  xbm("image/x-xbitmap"),
  xpm("image/x-xpixmap"),
  xwd("image/x-xwindowdump"),
  mht("message/rfc822"),
  mHTML("message/rfc822"),
  nws("message/rfc822"),
  css("text/CSS"),
  h323("text/h323"),
  htm("text/HTML"),
  html("text/HTML"),
  stm("text/HTML"),
  uls("text/iuls"),
  bas("text/plain"),
  c("text/plain"),
  h("text/plain"),
  txt("text/plain"),
  rtx("text/richtext"),
  sct("text/scriptlet"),
  tsv("text/tab-separated-values"),
  htt("text/webviewHTML"),
  htc("text/x-component"),
  etx("text/x-setext"),
  vcf("text/x-vcard"),
  mp2("video/mpeg"),
  mpa("video/mpeg"),
  mpe("video/mpeg");

  public final String value;

  private MIMEType(String value)
  {
    this.value = value;
  }

  public static MIMEType get(String value)
  {
    MIMEType[] types = MIMEType.values();

    for (int i = 0; i < types.length; i++)
    {
      if (types[i].value.equalsIgnoreCase(value))
      {
        return types[i];
      }
    }

    return MIMEType.all;
  }

  public String getValue()
  {
    return this.value;
  }

  public String toString()
  {
    return this.getValue();
  }

}
